#pragma once

#include <cstdint>

namespace kratos { namespace corelib {

class EventObject;
class EventTime;
class EventTimer;

// Event listener
class EventListener {
public:
    // process Event
    // @param eo event object
    virtual bool handleEvent(EventObject* eo) = 0;
    // returns listener ID
    virtual std::uint64_t getID() = 0;
};

// Time event listener
class TimeEventListener : public EventListener {
public:
    // process time event
    // @param evt EventTime object 
    virtual bool handleEvent(EventTime* evt) = 0;

public:
    virtual bool handleEvent(EventObject* eo);
};

// Timer event listener
class TimerEventListener : public EventListener {
public:
    // process timer event
    // @param evt EventTimer object
    virtual bool handleEvent(EventTimer* evt) = 0;

public:
    virtual bool handleEvent(EventObject* eo);
};

}}
